<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
%>

<form id="pagerForm" onsubmit="return navTabSearch(this);" action="backBorrowOrder/getBorrowPageByStatus/${params.borrowStatusArray}?bType=${params.bType}&myId=${params.myId}" method="post">
	<div class="pageHeader">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
<td>
						订单号:
						<input type="text" name="outTradeNo"
							value="${params.outTradeNo }"  id="outTradeNo"/>
					</td>
					<td>
						用户姓名:
						<input type="text" name="realname"
							value="${params.realname }" id="realname" />
					</td>
					<td>
						手机:
						<input type="text" name="userPhone"
							value="${params.userPhone }" id="userPhone" />
					</td>
					<td>
						公司名称:
						<input type="text" name="companyName"
							value="${params.companyName }" id="companyName" />
					</td>
					<td>
						放款日期:
						<input name="addStartTime" id="sVerifyLoanTime" value="${params.sVerifyLoanTime }" type="text"
																onfocus="WdatePicker({isShowClear:true,readOnly:false,maxDate:'#F{$dp.$D(\'sVerifyLoanTime\')||\'%y-%M-%d\'}'})" 
																title="" size="30" />
					</td>
					<td>
						至:
						<input name="addEndTiem" id="eVerifyLoanTime" value="${params.eVerifyLoanTime }" type="text"
																onfocus="WdatePicker({isShowClear:true,readOnly:false,maxDate:'#F{$dp.$D(\'eVerifyLoanTime\')||\'%y-%M-%d\'}'})" 
																title="" size="30" />
					</td>
					
					
					<td>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">
									查询
								</button>
							</div>
						</div>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div class="pageContent">
	 
		
			<jsp:include page="${BACK_URL}/rightSubList">
			<jsp:param value="${params.myId}" name="parentId"/>
		</jsp:include>
			<table class="table" style="width: 100%;" layoutH="112" nowrapTD="false">
				<thead>
					<tr >
						<th align="center"  >
							序号
						</th>
						<th align="left"  >
							订单号
						</th>
						<th align="center"  >
							姓名
						</th>
						<th align="center" >
							手机号
						</th>
						<th align="center"  >
							是否是老用户
						</th>
						<th align="center" >
							借款金额(元)
						</th>
						<th align="center"  >
								天数
						</th>
						<th align="center" >
							服务费利率(万分之一)
						</th>
						<th align="center" >
							下单时间
						</th>
						 
						<th align="center" >
							放款时间	
						</th>
				 
						<th align="center"  >
								子类型	
						</th>
						<th align="center"  >
							状态
						</th>
<!-- 						<th align="center"  > -->
<!-- 							操作 -->
<!-- 						</th> -->
					</tr>
				</thead>
				<tbody>
					<c:forEach var="borrow" items="${pm.items }" varStatus="status">
						<tr  target="sid_support" rel="${borrow.id }"  >
							<td>
								${status.count}
							</td>
							<td>
								${borrow.outTradeNo}
							</td>
							<td>
${borrow.user.realname}
							</td>
							<td>
							${borrow.user.userPhone }
 
							</td>
							<td>
								${borrow.user.customerTypeName}
							</td>
							<td>
 							<fmt:formatNumber type="number" value="${borrow.moneyAmount/100}" pattern="0.00" maxFractionDigits="2"/>
							</td>
									<td>
									
								${borrow.loanTerm }	
 
							</td>
							<td>
									
								${borrow.apr }	
 
							</td>
									<td>
 							<fmt:formatDate value="${borrow.orderTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
							</td>
						 
							 
					<td>
 							<fmt:formatDate value="${borrow.loanTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
							</td>
						
						 
									<td>
 						${borrow.orderTypeName }
							</td>
									<td>
 ${borrow.statusName }	
							</td>
<!-- 									<td> -->
<%--  	<a href="backBorrowOrder/getBorrowDetailById?selectId=${borrow.id }&parentId=${params.myId}"  target="dialog"  width="810" height="550" >查看</a> --%>
<!-- 							</td> -->
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<c:set var="page" value="${pm }"></c:set>
		<!-- 分页 -->
		<%@ include file="../page.jsp"%>
	</div>
</form>

<script type="text/javascript">
	if("${message}"){
		alertMsg.error(${message});
	}
	function changeDzExcel(obj){
		var href=$(obj).attr("href");
		var outTradeNo=$("#outTradeNo").val();
		var realname=$("#realname").val();
		var userPhone=$("#userPhone").val();
		var companyName=$("#companyName").val();
		var sVerifyLoanTime=$("#sVerifyLoanTime").val();
		var eVerifyLoanTime=$("#eVerifyLoanTime").val();
		var toHref=href+"&outTradeNo="+outTradeNo+"&realname="+realname+"&userPhone="+userPhone+"&companyName="+companyName+"&sVerifyLoanTime="+sVerifyLoanTime+"&eVerifyLoanTime="+eVerifyLoanTime;
		$(obj).attr("href",toHref);
	}
</script>